<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>农产品质量安全追溯系统 - 园区介绍</title>
<link rel="stylesheet" href="${path }/cms/css/public.css">
<link rel="stylesheet" href="${path }/cms/css/parkInquire.css">
<script type="text/javascript" src="${path }/cms/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${path }/cms/js/parkInquire.js"></script>
</head>
<body>

<div class="companyProfile">
    <%@ include file="/WEB-INF/cms/header.jsp" %>

    <div class="productInquire">
	    <div>
	        <img src="${path }/cms/images/cp1.png" alt="">
	    </div>
	    <div>
	        <img src="${path }/cms/images/cp2.png" alt="">
	    </div>
	    <div>
	        <input type="text" id="querycode" placeholder="请输入产品追溯码" />
	        <p>商品条码，例：6901267867891</p>
	        <img src="${path }/cms/images/cp5.png" alt="">
	    </div>
	    <div>
	        <a href="javascript:;" onclick="doQuery()">
		        <div>点击查询</div>
		        <img src="${path }/cms/images/cp4.png" alt="点击查询" />
		    </a>
	    </div>
	</div>
	
	<script type="text/javascript">
	function doQuery(){
		location.href = '${path}/c/traceQuery.do?code='+$('#querycode').val();
	}
	</script>

    <div class="btBox">
        <h2>园区介绍</h2>
        <p>Park profile</p>
    </div>

    <div class="yqTopImgText">
        <div>
            <img src="${park.img }" alt="" onerror="this.src='${path }/cms/def/park.png'">
        </div>
        <div class="yqTopImgTextRight">
            <div>
                <h2>${park.name }</h2>
            </div>
            <p>${park.remark }</p>
        </div>
    </div>
    
    <c:if test="${not empty park.wellProducts }">
    <div class="btBox">
        <h2>园区产品</h2>
    </div>

    <div class="lrBtnBox">
        <div class="yuanLeft" id="leftBtn">&lt;</div>
        <div class="yuanRight" id="rightBtn">一</div>
    </div>
    <div class="yqcpImgBox">
        <div class="dtImgBox" id="lrTranslate">
            <c:if test="${not empty park.wellProducts }">
            <c:forEach items="${park.wellProducts}" var="pdt">
            <div class="itemImgBox">
                <div class="floatMh">
                    ${pdt.name }
                </div>
                <img src="${pdt.img }" alt="">
            </div>
            </c:forEach>
            </c:if>
        </div>
    </div>
    </c:if>
    
<c:if test="${not empty parkTeSe }">
    <div class="btBox">
        <h2>资质认证</h2>
    </div>

    <div class="zzrzImgBox">
    	<c:if test="${not empty parkTeSe }">
    	<div>
            <img src="${filepath }/park_fujian/${parkTeSe.fujian}" alt="">
        </div>
    	</c:if>
    </div>
</c:if>

    <div class="connectUsMapBox" id="allmap"></div>
    <%@ include file="/WEB-INF/cms/footer.jsp" %>

</div>

<script type="text/javascript" src="https://map.qq.com/api/js?v=2.exp&key=QVPBZ-QJO6X-2S24Q-TVPQO-CRYC2-JMBL2" charset="utf-8"></script>
<script type="text/javascript">
var lng = '${park.lng}',lat = '${park.lat}';
$(function(){
	if(lng && lat){
		var map = new qq.maps.Map("allmap", {
	        center: new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)),
	        zoom: 10,
	        draggable: true,
	        scrollwheel: true,
	        disableDoubleClickZoom: true,
	        panControl:false,
	        zoomControl: false
	    });
		map.panTo(new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)));
		var marker = new qq.maps.Marker({position: new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)), map: map});
	}
});
</script>
</body>
</html>